package com.lframework.xingyun.promo.vo.member;

import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.lframework.starter.web.core.vo.BaseVo;
import javax.validation.constraints.NotNull;
import com.lframework.starter.web.core.components.validation.TypeMismatch;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.List;

@Data
public class UpdateMarketingMemberVo implements BaseVo, Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @ApiModelProperty(value = "ID", required = true)
    @NotBlank(message = "id不能为空！")
    private String id;

    /**
     * 会员活动名称
     */
    @ApiModelProperty(value = "会员活动名称", required = true)
    @NotBlank(message = "请输入会员活动名称！")
    @Length(message = "会员活动名称最多允许20个字符！")
    private String name;

    /**
     * 会员活动开始时间
     */
    @ApiModelProperty(value = "会员活动开始时间", required = true)
    @TypeMismatch(message = "会员活动开始时间格式有误！")
    @NotNull(message = "请输入会员活动开始时间！")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime beginDate;

    /**
     * 会员活动结束时间
     */
    @ApiModelProperty(value = "会员活动结束时间", required = true)
    @TypeMismatch(message = "会员活动开始时间格式有误！")
    @NotNull(message = "请输入会员活动结束时间！")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endDate;

    /**
     * 会员活动类型(1:生日营销; 2:节日营销; 3:会员日营销;)
     */
    @ApiModelProperty(value = "会员活动类型(1:生日营销; 2:节日营销; 3:会员日营销;)", required = true)
    @TypeMismatch(message = "会员活动类型(1:生日营销; 2:节日营销; 3:会员日营销;)格式有误！")
    @NotNull(message = "请输入会员活动类型(1:生日营销; 2:节日营销; 3:会员日营销;)！")
    private Integer promotionsType;

    /**
     * 会员活动范围(1:当日; 2:当周; 3:当月;)
     */
    @ApiModelProperty(value = "会员活动范围(1:当日; 2:当周; 3:当月;)", required = true)
    @TypeMismatch(message = "会员活动范围(1:当日; 2:当周; 3:当月;)格式有误！")
    @NotNull(message = "请输入会员活动范围(1:当日; 2:当周; 3:当月;)！")
    private Integer scopeType;

    /**
     * 参加方式(1:自动参加:; 2:手动参加; )
     */
    @ApiModelProperty(value = "参加方式(1:自动参加:; 2:手动参加; )", required = true)
    @TypeMismatch(message = "参加方式(1:自动参加:; 2:手动参加; )格式有误！")
    @NotNull(message = "请输入参加方式(1:自动参加:; 2:手动参加; )！")
    private Integer attendType;

    /**
     * 领取模式(1:活动范围内1次; 2:活动范围每日1次)
     */
    @ApiModelProperty(value = "领取模式(1:活动范围内1次; 2:活动范围每日1次)", required = true)
    @TypeMismatch(message = "领取模式(1:活动范围内1次; 2:活动范围每日1次)格式有误！")
    @NotNull(message = "请输入领取模式(1:活动范围内1次; 2:活动范围每日1次)！")
    private Integer claimMode;

    /**
     * 是否适应全部会员等级
     */
    @ApiModelProperty(value = "是否适应全部会员等级", required = true)
    @TypeMismatch(message = "是否适应全部会员等级格式有误！")
    @NotNull(message = "请输入是否适应全部会员等级！")
    private Boolean allMemberLevel;

    /**
     * 会员等级id
     */
    @ApiModelProperty(value = "会员等级id")
    private List<String> memberLevelIds;

    /**
     * 是否消费积分翻倍
     */
    @ApiModelProperty(value = "是否消费积分翻倍", required = true)
    @TypeMismatch(message = "是否消费积分翻倍格式有误！")
    @NotNull(message = "请输入是否消费积分翻倍！")
    private Boolean consumeScoreFlag;

    /**
     * 积分倍率
     */
    @ApiModelProperty(value = "积分倍率")
    private Integer consumeScoreRate;

    /**
     * 是否直接赠送积分
     */
    @ApiModelProperty(value = "是否直接赠送积分", required = true)
    @TypeMismatch(message = "是否直接赠送积分格式有误！")
    @NotNull(message = "请输入是否直接赠送积分！")
    private Boolean scoreFlag;

    /**
     * 赠送积分
     */
    @ApiModelProperty(value = "赠送积分")
    private Integer scoreValue;

    /**
     * 是否赠送优惠券
     */
    @ApiModelProperty(value = "是否赠送优惠券", required = true)
    @TypeMismatch(message = "是否赠送优惠券格式有误！")
    @NotNull(message = "请输入是否赠送优惠券！")
    private Boolean couponFlag;

    /**
     * 优惠券id
     */
    @ApiModelProperty(value = "优惠券id")
    private List<String> couponIds;

    /**
     * 是否消费折扣
     */
    @ApiModelProperty("是否消费折扣")
    @TypeMismatch(message = "是否消费折扣格式有误！")
    @NotNull(message = "请输入是是否消费折扣！")
    private Boolean discountFlag;

    /**
     * 折扣
     */
    @ApiModelProperty("折扣")
    private BigDecimal discountValue;

}

